<script>
	export default {
		onLaunch: function() {
			console.log('App Launch')
		},
		onShow: function() {
			const loginStatus = uni.getStorageSync('chamberlain_login_status')
			const openid = uni.getStorageSync('chamberlain_openid')
			const userInfo = uni.getStorageSync('chamberlain_user_info')
			this.$store.commit('user/SET_OPENID', openid)
			this.$store.commit('user/SET_USER_INFO', userInfo)
			this.$store.commit('user/SET_LOGIN_STATUS', loginStatus)
			if (loginStatus && !userInfo.openid) {
				this.$store.dispatch('user/loading')
			}
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	@import "uview-ui/index.scss";
	@import url('./static/icon-font/iconfont.css');

	view,
	text {
		padding: 0;
		margin: 0;
		box-sizing: border-box;
		font-size: 30rpx;
	}

	page {
		background-color: #f6f7f8;
		color: #1E222F;
	}

	body {
		color: #1E222F;
		line-height: 52rpx;
	}

	.u-navbar__content__left--hover {
		opacity: 1 !important;
	}

	/*每个页面公共css */
	.yun-content {
		display: flex;
		flex-direction: column;
		height: 100vh;
		padding: 0 30rpx;
		background-color: #f6f7f8;
		line-height: 1.5;

		.yun-main {
			flex: 1;
			overflow: auto;
			opacity: 1;
		}
	}

	.yun-hover {
		opacity: 0.7;
	}
</style>